home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Languguage OS 2
/
Languguage OS II Version 10-94 (Knowledge Media)(1994).ISO
/
language
/
txl
/
readme
< prev
Wrap
Text File
|
1991-09-09
|
4KB
|
88 lines
---------------------------------------------
TXL v5.3 Sampler Workbench for Unix Systems
---------------------------------------------
J.R. Cordy, C.D. Halpern, E.M. Promislow & I.H. Carmichael
Queen's University at Kingston, Canada
September 1991
TXL v5.3 (c) 1988-1991, Queen's University
This directory contains version 5.3 of the Tree Transformation Language
(TXL) for Unix systems.
TXL is a generalized source-to-source translation system suitable for
prototyping computer languages of any kind. It has been used to
prototype several new programming languages as well as specification
and command languages. TXL takes as input an arbitrary context-free
grammar in BNF-like notation, and a set of show-by-example transformation
rules to be applied to inputs parsed using the grammar. TXL will
automatically parse inputs in the language described by the grammar,
no matter how ambiguous or left-recursive, and then successively apply
the transformation rules to the parsed input until they fail, producing
as output the transformed source. For further information on TXL itself
see the documents in the Documents subdirectory.
This directory contains a demonstration version of the TXL transformer
as well as several examples of its use in both programming language and
more general purpose applications in the directory "TXLexamples".
The subdirectories "TuringDialectExamples", "UserExamples" and
"GeneralExamples" contain example inputs for several example languages
and applications implemented using TXL, and the subdirectory "Txl" of
each of those directories contains the corresponding TXL grammar and rule
set specifications of the example languages and applications themselves.
To run TXL on those inputs, simply change directory to the directory
containing the example, for example,
chdir Examples/TuringDialectExamples
and run the command "txl" with the example file as argument.
For example,
txl Stack.GT
TXL infers the name of the appropriate TXL specification to use from
the part of the input file name following the ".". For example,
"Stack.GT" is an example input for the "GT" ("Generic Turing") dialect
of the Turing language. Many of the example TXL specs, such as
"GT", are prototype extensions to existing languages and include TXL
specs for the basic language they are extending (Turing, in the case
of GT) from other spec files (e.g., "Turing.Grammar") and then override
some of the syntactic forms of the basic language grammar with new ones
of the same name, adding the extensions. The rule sets of these
"dialects" then transform to the original basis language, effectively
giving a prototype executable source of the dialect input program to test.
TXL can be run with interactive input using the command
"itxl language-name" to test out new or existing TXL specifications
quickly. For example, the command
itxl Calculator
will prompt for one line of input to be parsed and transformed by the
"Calculator.Txl" TXL specification in the "Examples/GeneralExamples"
subdirectory.
We suggest that you begin your exploration of the TXL world by running
the script "LearnTxl" in this directory.
Before doing that, however, you will have to install TXL in your system.
This is done automatically by the "InstallTxl" script, which you should
run once first.
TXL is still under development as a general linguistic prototyping tool,
and we are interested in any and all experience in its use. Send
questions or comments to:
Prof. J.R. Cordy
Department of Computing & Information Science
Queen's University
Kingston, Canada K7L 3N6
or by Internet electronic mail to Cordy@Qucis.QueensU.CA
J.R. Cordy
5 Sep 1991